package com.tengol.demo.design.pattern.structural.facade.subsystem;

import com.tengol.demo.design.pattern.structural.facade.domain.PointGift;

import java.text.MessageFormat;

/**
 * 快递服务子系统
 *
 * @author dongrui
 * @date 2019/03/05
 */
public class ExpressDeliveryService {
    public String deliveryGift(PointGift pointGift){
        //物流运输系统
        if(pointGift != null){
            String deliveryNo = "6666666";
            System.out.println(MessageFormat.format("礼物{0}已交付顺丰快递，快递单号为：{1}",pointGift.getName(),deliveryNo));
            return deliveryNo;
        }
        return null;
    }
}
